import { post, get, download } from '../../../request'

/**
 * 查询用户列表
 * @param {*} params
 * @returns
 */
export const userList = params => {
    return post({
        url: '/system/user/pageList',
        params
    })
}

/**
 * 删除用户
 * @param {*} params
 * @returns
 */
export const userDelete = params => {
    return post({
        url: '/system/user/delete',
        params,
        loading: true
    })
}
/**
 * 新增用户
 * @param {*} params
 * @returns
 */
export const userSave = params => {
    return post({
        url: '/system/user/save',
        params,
        loading: true
    })
}
/**
 * 用户详情查看
 * @param {*} params
 * @returns
 */
export const userInfo = params => {
    return get({
        url: '/system/user/info',
        params
    })
}

/**
 * 修改用户
 * @param {*} params
 * @returns
 */
export const userUpdate = params => {
    return post({
        url: '/system/user/update',
        params,
        loading: true
    })
}

/**
 * 重置密码
 * @param {*} params
 * @returns
 */
export const resetPwd = params => {
    return post({
        url: '/system/user/resetPwd',
        params,
        loading: true
    })
}

/**
 * 导出数据
 * @param {*} params
 * @returns
 */
export const exportExcel = params => {
    return download({
        url: '/system/user/exportExcel',
        params
    })
}
